tot = 0
for i in range(1, 6):
    for l in range(1, 9):
        for r in range(l, 9):
            print(i, l, r)
            tot += 1
print(tot)
